package com.xtyhz.pojo.app;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * TableName ap_user
 */
@TableName(value ="ap_user")
@Schema(description = "用户信息表")
@Data
public class ApUser implements Serializable {

    @TableId(type = IdType.AUTO)
    @Parameter(name = "id", description = "用户ID", required = true)
    private Long id;

    @Parameter(name = "openId", description = "微信用户唯一标识", required = true)
    @TableField("open_id")
    private String openId;

    @Parameter(name = "unionId", description = "微信开放平台下的用户统一标识", required = true)
    @TableField("union_id")
    private String unionId;

    @Parameter(name = "sessionKey", description = "微信会话密钥", required = true)
    @TableField("session_key")
    private String sessionKey;

    @Parameter(name = "nickName", description = "用户昵称", required = true)
    @TableField("nick_name")
    private String nickName;

    @Parameter(name = "avatarUrl", description = "用户头像URL", required = true)
    @TableField("avatar_url")
    private String avatarUrl;

    @Parameter(name = "gender", description = "性别: 0-未知，1-男，2-女", required = true)
    private Integer gender;

    @Parameter(name = "country", description = "国家", required = true)
    private String country;

    @Parameter(name = "province", description = "省份", required = true)
    private String province;

    @Parameter(name = "city", description = "城市", required = true)
    private String city;

    @Parameter(name = "language", description = "语言", required = true)
    private String language;

    @Parameter(name = "phone", description = "手机号码", required = true)
    private String phone;

    @Parameter(name = "email", description = "邮箱", required = true)
    private String email;

    @Parameter(name = "isActive", description = "是否激活: 0-否，1-是", required = true)
    @TableField("is_active")
    private Integer isActive;

    @Parameter(name = "userRole", description = "用户角色: 0-普通用户，1-VIP用户，2-管理员", required = true)
    @TableField("user_role")
    private Integer userRole;

    @Parameter(name = "createdAt", description = "创建时间", required = true)
    @TableField("created_time")
    private Date createTime;

    @Parameter(name = "updatedAt", description = "更新时间", required = true)
    @TableField("updated_time")
    private Date updatedTime;

    @Parameter(name = "lastLoginAt", description = "最后登录时间", required = true)
    @TableField("last_login")
    private Date lastLogin;


}